import axios from "axios";
import qs from "qs";
export function posturl(url, data, callBack) {
  // let that = this
  axios({
    method: "post",
    // url: 'http://www.ciprun.com' + url,
    url: url,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
    },
    data: qs.stringify(data)
  }).then(function(res) {
    var r = res.data;
    callBack(r);
  });
}
export function geturl(url, data, callBack) {
  // let that = this
  axios({
    method: "get",
    // url: 'http://www.ciprun.com' + url,
    url: url,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
    },
    data: qs.stringify(data)
  }).then(function(res) {
    var r = res.data;
    callBack(r);
  });
}
